//
//  TagVideoViewController.m
//  QiuNiuDemo
//
//  Created by liqian on 2018/10/18.
//  Copyright © 2018年 Facebook. All rights reserved.
//

#import "TagVideoViewController.h"
//#import <PLShortVideoKit/PLShortVideoKit.h>

#define PLS_RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]
#define PLS_BaseToolboxView_HEIGHT 64
#define PLS_SCREEN_WIDTH CGRectGetWidth([UIScreen mainScreen].bounds)
#define PLS_SCREEN_HEIGHT CGRectGetHeight([UIScreen mainScreen].bounds)
@interface TagVideoViewController ()
//<
//  PLShortVideoRecorderDelegate
//>
//@property (strong, nonatomic) PLSVideoConfiguration *videoConfiguration;
//@property (strong, nonatomic) PLSAudioConfiguration *audioConfiguration;
//@property (strong, nonatomic) PLShortVideoRecorder *shortVideoRecorder;
@end

@implementation TagVideoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)loadView{
  [super loadView];
  self.view.backgroundColor = PLS_RGBCOLOR(25, 24, 36);
  
  // --------------------------
  // 短视频录制核心类设置
  [self setupShortVideoRecorder];
  
  // --------------------------
//  [self setupBaseToolboxView];
//  [self setupRecordToolboxView];
}

- (void)setupShortVideoRecorder{
  // SDK 的版本信息
//  NSLog(@"PLShortVideoRecorder versionInfo: %@", [PLShortVideoRecorder versionInfo]);
  
//  self.videoConfiguration = [PLSVideoConfiguration defaultConfiguration];
//  self.videoConfiguration.position = AVCaptureDevicePositionFront;
//  self.videoConfiguration.videoFrameRate = 25;
//  self.videoConfiguration.averageVideoBitRate = 1024*1000;
//  self.videoConfiguration.videoSize = CGSizeMake(544, 960);
//  self.videoConfiguration.videoOrientation = AVCaptureVideoOrientationPortrait;
//
//  self.audioConfiguration = [PLSAudioConfiguration defaultConfiguration];
//
//  self.shortVideoRecorder = [[PLShortVideoRecorder alloc] initWithVideoConfiguration:self.videoConfiguration audioConfiguration:self.audioConfiguration];
//  self.shortVideoRecorder.delegate = self;
//  self.shortVideoRecorder.maxDuration = 10.0f; // 设置最长录制时长
//  [self.shortVideoRecorder setBeautifyModeOn:YES]; // 默认打开美颜
//  self.shortVideoRecorder.outputFileType = PLSFileTypeMPEG4;
//  self.shortVideoRecorder.innerFocusViewShowEnable = YES; // 显示 SDK 内部自带的对焦动画
//  self.shortVideoRecorder.previewView.frame = CGRectMake(0, 0, PLS_SCREEN_WIDTH, PLS_SCREEN_HEIGHT);
//  [self.view addSubview:self.shortVideoRecorder.previewView];
//  self.shortVideoRecorder.backgroundMonitorEnable = NO;
}
@end
